const Koa = require('koa');
const path = require('path');
const static = require('koa-static');
const session = require('koa-session');
const Router = require('./routers/primary')
const fs = require('fs');
// const nunjucks = require('nunjucks');
// const views = require('koa-view');

const PORT = 8080;
const bodyparer = require('koa-bodyparser');

const app = new Koa();



// app.use(views('./web',{
//     map:{
//         html:'nunjucks'
//     }
// }))

app.use(bodyparer())

app.use(Router.routes())

app.listen(PORT,()=>{
    console.log("server running at http://127.0.0.1:"+PORT);
})